xen: arm: Factor out psr_mode_is_user
authorIan Campbell <ian.campbell@citrix.com>
Mon, 30 Mar 2015 11:12:22 +0000 (12:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 31 Mar 2015 08:42:18 +0000 (09:42 +0100)
commit9e1342cf1aabf5841293d32c918f59ffee01ec67
tree64684204c87c36b5204f08df43e4ca574143f3ac
parentc442d34f395cebfc41fc39b2c8ce40b7f05883c3
xen: arm: Factor out psr_mode_is_user

This embodies the logic on arm64 that userspace can be either 32-bit
or 64-bit. It will be used in other places shortly.

Note that the logic differs slightly because the original (in
inject_abt64_exception) knew that the kernel was 64-bit and could
therefore assume that any 32-bit mode was userspace. Instead the
refactored code explicitly checks for usr mode.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/traps.c
xen/include/asm-arm/regs.h